package com.fancy.learncenter.bean;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;

import java.io.Serializable;
import java.util.List;

/**
 * Created by hyy on 2018/5/6.
 */

public class YgtDetailDesDataBean implements  Parcelable{
    /**
     * id : 180013
     * name : 安卓测试
     * imgsrc :
     * feature : 99新
     * period : 100
     * subsidy : 20
     * star : 5
     * user_id : 28
     * description : 这是一个99新的产品
     * classify_id : 13
     * unit :
     * seque : 0
     * is_delete : 0
     * add_time : 2018-05-04 14:19:47
     * options : [{"id":"5170","goods_id":"180013","goods_option":"牙刷","money":"100"}]
     * case : [{"id":"79","goods_id":"180013","case_title":"","case_img":"http://yigoutong.shweijue.com//upload/goods/201805/15254147876239.jpeg"},{"id":"80","goods_id":"180013","case_title":"","case_img":"http://yigoutong.shweijue.com//upload/goods/201805/15254147873928.jpeg"},{"id":"81","goods_id":"180013","case_title":"","case_img":"http://yigoutong.shweijue.com//upload/goods/201805/15254147873545.jpeg"}]
     */

    private String id;
    private String name;
    private String imgsrc;
    private String feature;
    private String period;
    private String subsidy;
    private String star;
    private String user_id;
    private String description;
    private String classify_id;
    private String unit;
    private String people_num;
    private String seque;
    private String is_delete;


    protected YgtDetailDesDataBean(Parcel in) {
        id = in.readString();
        name = in.readString();
        imgsrc = in.readString();
        feature = in.readString();
        period = in.readString();
        subsidy = in.readString();
        star = in.readString();
        user_id = in.readString();
        description = in.readString();
        classify_id = in.readString();
        unit = in.readString();
        people_num = in.readString();
        seque = in.readString();
        is_delete = in.readString();
        description_notag = in.readString();
        add_time = in.readString();
        options = in.createTypedArrayList(OptionsBean.CREATOR);
        caseX = in.createTypedArrayList(CaseBean.CREATOR);
    }

    public static final Creator<YgtDetailDesDataBean> CREATOR = new Creator<YgtDetailDesDataBean>() {
        @Override
        public YgtDetailDesDataBean createFromParcel(Parcel in) {
            return new YgtDetailDesDataBean(in);
        }

        @Override
        public YgtDetailDesDataBean[] newArray(int size) {
            return new YgtDetailDesDataBean[size];
        }
    };

    public String getPeople_num() {
        return people_num;
    }

    public void setPeople_num(String people_num) {
        this.people_num = people_num;
    }


    public String getDescription_notag() {
        return description_notag;
    }

    public void setDescription_notag(String description_notag) {
        this.description_notag = description_notag;
    }

    private String description_notag;
    private String add_time;
    private List<OptionsBean> options;
    @SerializedName("case")
    private List<CaseBean> caseX;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getImgsrc() {
        return imgsrc;
    }

    public void setImgsrc(String imgsrc) {
        this.imgsrc = imgsrc;
    }

    public String getFeature() {
        return feature;
    }

    public void setFeature(String feature) {
        this.feature = feature;
    }

    public String getPeriod() {
        return period;
    }

    public void setPeriod(String period) {
        this.period = period;
    }

    public String getSubsidy() {
        return subsidy;
    }

    public void setSubsidy(String subsidy) {
        this.subsidy = subsidy;
    }

    public String getStar() {
        return star;
    }

    public void setStar(String star) {
        this.star = star;
    }

    public String getUser_id() {
        return user_id;
    }

    public void setUser_id(String user_id) {
        this.user_id = user_id;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getClassify_id() {
        return classify_id;
    }

    public void setClassify_id(String classify_id) {
        this.classify_id = classify_id;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getSeque() {
        return seque;
    }

    public void setSeque(String seque) {
        this.seque = seque;
    }

    public String getIs_delete() {
        return is_delete;
    }

    public void setIs_delete(String is_delete) {
        this.is_delete = is_delete;
    }

    public String getAdd_time() {
        return add_time;
    }

    public void setAdd_time(String add_time) {
        this.add_time = add_time;
    }

    public List<OptionsBean> getOptions() {
        return options;
    }

    public void setOptions(List<OptionsBean> options) {
        this.options = options;
    }

    public List<CaseBean> getCaseX() {
        return caseX;
    }

    public void setCaseX(List<CaseBean> caseX) {
        this.caseX = caseX;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(id);
        dest.writeString(name);
        dest.writeString(imgsrc);
        dest.writeString(feature);
        dest.writeString(period);
        dest.writeString(subsidy);
        dest.writeString(star);
        dest.writeString(user_id);
        dest.writeString(description);
        dest.writeString(classify_id);
        dest.writeString(unit);
        dest.writeString(people_num);
        dest.writeString(seque);
        dest.writeString(is_delete);
        dest.writeString(description_notag);
        dest.writeString(add_time);
        dest.writeTypedList(options);
        dest.writeTypedList(caseX);
    }


    public static class OptionsBean implements Parcelable {
        /**
         * id : 5170
         * goods_id : 180013
         * goods_option : 牙刷
         * money : 100
         */

        private String id;
        private String goods_id;
        private String goods_option;
        private String money;

        public OptionsBean() {

        }

        protected OptionsBean(Parcel in) {
            id = in.readString();
            goods_id = in.readString();
            goods_option = in.readString();
            money = in.readString();
        }

        public static final Creator<OptionsBean> CREATOR = new Creator<OptionsBean>() {
            @Override
            public OptionsBean createFromParcel(Parcel in) {
                return new OptionsBean(in);
            }

            @Override
            public OptionsBean[] newArray(int size) {
                return new OptionsBean[size];
            }
        };

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getGoods_id() {
            return goods_id;
        }

        public void setGoods_id(String goods_id) {
            this.goods_id = goods_id;
        }

        public String getGoods_option() {
            return goods_option;
        }

        public void setGoods_option(String goods_option) {
            this.goods_option = goods_option;
        }

        public String getMoney() {
            return money;
        }

        public void setMoney(String money) {
            this.money = money;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(id);
            dest.writeString(goods_id);
            dest.writeString(goods_option);
            dest.writeString(money);
        }
    }

    public static class CaseBean implements Parcelable {
        /**
         * id : 79
         * goods_id : 180013
         * case_title :
         * case_img : http://yigoutong.shweijue.com//upload/goods/201805/15254147876239.jpeg
         */

        private String id;
        private String goods_id;
        private String case_title;
        private String case_img;

        protected CaseBean(Parcel in) {
            id = in.readString();
            goods_id = in.readString();
            case_title = in.readString();
            case_img = in.readString();
        }

        public static final Creator<CaseBean> CREATOR = new Creator<CaseBean>() {
            @Override
            public CaseBean createFromParcel(Parcel in) {
                return new CaseBean(in);
            }

            @Override
            public CaseBean[] newArray(int size) {
                return new CaseBean[size];
            }
        };

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getGoods_id() {
            return goods_id;
        }

        public void setGoods_id(String goods_id) {
            this.goods_id = goods_id;
        }

        public String getCase_title() {
            return case_title;
        }

        public void setCase_title(String case_title) {
            this.case_title = case_title;
        }

        public String getCase_img() {
            return case_img;
        }

        public void setCase_img(String case_img) {
            this.case_img = case_img;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(id);
            dest.writeString(goods_id);
            dest.writeString(case_title);
            dest.writeString(case_img);
        }
    }
}
